cmake_minimum_required(VERSION 3.30)
project(src)

set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

find_package(Qt5 COMPONENTS Core Widgets Gui Network SerialPort Bluetooth PrintSupport REQUIRED)

set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)

set(SRC
    adaptivestackedwidget.cpp
    asynccrc.cpp
    connection.cpp
    controlitem.cpp
    ctrltab.cpp
    datatab.cpp
    devicetab.cpp
    filetab.cpp
    filexceiver.cpp
    legenditemdialog.cpp
    main.cpp
    mainwindow.cpp
    metadata.cpp
    mycustomplot.cpp
    mysettings.cpp
    plottab.cpp
    serialpinout.cpp
    settingstab.cpp
    util.cpp
    qcustomplot.cpp
    smoothcurve.cpp
    metadata.h
    adaptivestackedwidget.h
    asynccrc.h
    connection.h
    controlitem.h
    ctrltab.h
    datatab.h
    devicetab.h
    filetab.h
    filexceiver.h
    legenditemdialog.h
    mainwindow.h
    mycustomplot.h
    mysettings.h
    plottab.h
    serialpinout.h
    settingstab.h
    util.h
    qcustomplot.h
    smoothcurve.h
    settingstab.ui
    filetab.ui
    legenditemdialog.ui
    serialpinout.ui
    devicetab.ui
    datatab.ui
    ctrltab.ui
    controlitem.ui
    mainwindow.ui
    plottab.ui
    i18n/language.qrc
    qdarkstyle/dark/darkstyle.qrc
    qdarkstyle/light/lightstyle.qrc
    i18n/SerialTest_zh_CN.ts
    i18n/SerialTest_zh_TW.ts
    i18n/SerialTest_nb_NO.ts
    icon/icon.ico
)

add_executable(SerialTest
    ${SRC})

target_link_libraries(SerialTest
    Qt5::Core Qt5::Widgets Qt5::SerialPort Qt5::Bluetooth Qt5::Network Qt5::PrintSupport)
